using QueryBuilder.Core.Query.SqlTypes;
using QueryBuilder.Core.Query.Type;

namespace QueryBuilder.Core.Query.Tests.ExampleConstraintPresenter.Mocks
{
    public class ExampleTypeFactory : TypeMappingsRegistry
    {
        protected override void RegisterTypeMappings()
        {
            ITypeMapping boolTypeMapping = new BooleanType() {SqlType = SqlTypeFactory.Boolean};

            this.RegisterTypeMapping(boolTypeMapping, "bool");

            ITypeMapping stringTypeMapping = new StringType();

            this.RegisterTypeMapping(stringTypeMapping, "String");

            ITypeMapping intTypeMapping = new Int32Type();

            this.RegisterTypeMapping(intTypeMapping, "Int32");

            ITypeMapping dateTimeMapping = new DateTimeType();

            this.RegisterTypeMapping(dateTimeMapping, "DateTime");
        }
    }
}